﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ComputerArchitecture.Numbers
{
    public class UnsignedBitNumber : BitNumber, IUnsignedBitNumber
    {
        #region Constructors

        public UnsignedBitNumber(int count) : base(count)
        {
        }

        public UnsignedBitNumber(IEnumerable<Bit> bits) : base(bits)
        {
        }

        #endregion

        public override void Expand(int newSize)
        {
        }

        public override object Clone()
        {
            return new UnsignedBitNumber(this.Bits);
        }

        public override string ToString()
        {
            return base.ToString();
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(obj, null))
            {
                return false;
            }
            IUnsignedBitNumber other = obj as IUnsignedBitNumber;
            return !ReferenceEquals(other, null) && this.Equals(other);
        }

        public bool Equals(IUnsignedBitNumber other)
        {
            return this.Equals((IBitNumber) other);
        }
    }
}
